<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="robots" content="noindex,nofollow">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="img/style.css" rel="stylesheet" type="text/css" />
  <link href="../webuploader/webuploader.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" type="text/css" href="layui/css/layui.css" />    
  <title>视频管理</title>
  <script src="editor/kindeditor-min.js" type="text/javascript"></script>
  <script src="editor/lang/zh-CN.js" type="text/javascript"></script>
  <script src="js/common.js" type="text/javascript"></script>
  <script src="js/jquery.min.js" type="text/javascript"></script>
  <script src="js/jquery-form.js" type="text/javascript"></script>	
  <script src="../webuploader/webuploader.js" type="text/javascript"></script> 
  <script src="../webuploader/vupload.js" type="text/javascript"></script>  
  <script src="js/main.js" type="text/javascript"></script>
  <script src="layui/layui.js" type="text/javascript"></script>  
</head>
<body>
<!--当前导航-->

<div class="layui-card">

  <form id="upload_from1" action="editor/php/upload_json.php" style="display:none" method="post" enctype="multipart/form-data">
    <input type="file" name="imgFile" value="">
  </form>
  <form id="upload_from2" action="editor/php/upload_json.php" style="display:none" method="post" enctype="multipart/form-data">
    <input type="file" name="imgFile" value="">
  </form>
  <form id="upload_from3" action="editor/php/upload_json.php" style="display:none" method="post" enctype="multipart/form-data">
    <input type="file" name="imgFile" value="">
  </form>

  <div class="layui-card-header">添加视频</div>
  <div class="layui-card-body">
      <form action="?action=save&acttype=edit" method="post" name="addform" id="addform" class="layui-form">

        <div class="layui-form-item">
          <label class="layui-form-label">更新时间：</label>
          <div class="layui-input-block">
            <input type="checkbox" name="isupdatetime"  id="isupdatetime"  title="更新发布时间" lay-skin="primary" checked  value="1" />
          </div>
        </div>

          <div class="layui-form-item">
            <label class="layui-form-label">视频标题：</label>
            <div class="layui-input-block">
              <input type="text" id="v_name" name="v_name" lay-verify="required" placeholder="请输入标题"
                autocomplete="off" class="layui-input" value="<?php echo $vrow['v_name']?>"/>
            </div>
          </div>

          <div class="layui-form-item">
            <label class="layui-form-label">视频分类：</label>
            <div class="layui-input-block">
              <select name="v_type" id="v_type"  lay-verify="required" lay-search>
                <option value="">请选择视频分类</option>
                <?php makeTypeOptionSelected(0," 　","",$vtype,0);?>
              </select>
            </div>
          </div>                  

          <div class="layui-form-item">
            <label class="layui-form-label">课堂分类：</label>
            <div class="layui-input-block">
              <?php getjqslectEDIT($vextrajqtype);?>
          </div>
        </div>

          <div class="layui-form-item">
            <div class="layui-block">
              <label class="layui-form-label">图片地址：</label>
              <div class="layui-input-inline" >
                <input name="v_pic" type="text" id="v_pic" value="<?php echo $vrow['v_pic']?>" size="30" class="layui-input" />
              </div>
              <div class="layui-input-inline" style="width: 80px;">
                <input name="doClear1" type="button" id="doClear1" value="清  除"
                  onclick="javascript:document.addform.v_pic.value='';" class="layui-btn" />
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <input name="upButton11" type="button" id="upButton11" value="选择图片"
                  class="layui-btn layui-btn-danger" />
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <input name="upButton12" type="button" id="upButton12" value="上传图片"
                  class="layui-btn layui-btn-danger" />
              </div>
            </div>
          </div>
          
          <div class="layui-form-item">
            <div class="layui-block">
              <label class="layui-form-label">幻灯图片：</label>
              <div class="layui-input-inline" >
                <input name="v_spic" type="text" id="v_spic" value="<?php echo $vrow['v_spic']?>" size="30" class="layui-input" />
              </div>
              <div class="layui-input-inline" style="width: 80px;">
                <input name="doClear2" type="button" id="doClear2" value="清  除"
                  onclick="javascript:document.addform.v_spic.value='';" class="layui-btn" />
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <input name="upButton21" type="button" id="upButton21" value="选择图片"
                  class="layui-btn layui-btn-danger" />
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <input name="upButton22" type="button" id="upButton22" value="上传图片"
                  class="layui-btn layui-btn-danger" />
              </div>
            </div>
          </div>
          
          <div class="layui-form-item" style="display: none;">
            <div class="layui-block">
              <label class="layui-form-label">背景图片：</label>
              <div class="layui-input-inline" >
                <input name="v_gpic" type="text" id="v_gpic" value="<?php echo $vrow['v_gpic']?>" size="30" class="layui-input" />
              </div>
              <div class="layui-input-inline" style="width: 80px;">
                <input name="doClear3" type="button" id="doClear3" value="清  除"
                  onclick="javascript:document.addform.v_gpic.value='';" class="layui-btn" />
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <input name="upButton31" type="button" id="upButton31" value="选择图片"
                  class="layui-btn layui-btn-danger" />
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <input name="upButton32" type="button" id="upButton32" value="上传图片"
                  class="layui-btn layui-btn-danger" />
              </div>
            </div>
          </div>   
          
          <div class="layui-form-item">
            <label class="layui-form-label">执　　教：</label>
            <div class="layui-input-block">
              <input size="30" name="v_actor" value="<?php echo $vrow['v_actor']?>" class="layui-input" />
            </div>
          </div>

          <div class="layui-form-item">
            <label class="layui-form-label">选择学期：</label>
            <div class="layui-input-block">
              <select name="v_lang" id="v_lang">
                <option value="">选择学期</option>
                <option value="上学期" <?php if($vrow["v_lang"]=='上学期') echo 'selected';?>>上学期</option>
                <option value="下学期" <?php if($vrow["v_lang"]=='下学期') echo 'selected';?>>下学期</option>
              </select>
            </div>
          </div>              
          <div class="layui-form-item">
            <label class="layui-form-label">年　　级：</label>
            <div class="layui-input-block">
              <?php echo getAreaSelect("v_publisharea","请选择年级",$vrow["v_publisharea"]);?>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">班　　级：</label>
            <div class="layui-input-block">
              <input name="v_director" size="10" value="<?php echo $vrow['v_director'] ?>"  class="layui-input" />
            </div>
          </div> 

          <div class="layui-form-item">
            <label class="layui-form-label">版　　本：</label>
            <div class="layui-input-block">
              <?php echo getVerSelect("v_ver","选择或填写",$vrow["v_ver"]);?>
            </div>
          </div>             
          
          <div class="layui-form-item">
            <label class="layui-form-label">选择星级：</label>
            <div class="layui-input-block">
              <select name="v_commend" id="v_commend">
                <option value=0 <?php if($vrow[v_commend]==0) echo 'selected';?>>选择星级</option>
                <option value=1 <?php if($vrow[v_commend]==1) echo 'selected';?>>一星</option>
                <option value=2 <?php if($vrow[v_commend]==2) echo 'selected';?>>二星</option>
                <option value=3 <?php if($vrow[v_commend]==3) echo 'selected';?>>三星</option>
                <option value=4 <?php if($vrow[v_commend]==4) echo 'selected';?>>四星</option>
                <option value=5 <?php if($vrow[v_commend]==5) echo 'selected';?>>五星</option>
              </select>
            </div>
          </div>   
          
          <div class="layui-form-item">
            <label class="layui-form-label">播放密码：</label>
            <div class="layui-input-block">
              <input name="v_psd" size="10" placeholder="非空时需要输入密码才能播放" value="<?php echo $vrow['v_psd'] ?>" class="layui-input" />
            </div>
          </div>   
          

          <div class="layui-form-item">
            <div class="layui-block">
              <label class="layui-form-label">视频上传：</label>
              <div class="layui-input-inline" style="width: 80px;">
                <input name="selVideo1" type="button" id="selVideo1" class="layui-btn  layui-btn-sm layui-btn-normal" value="选择视频"/>
              </div>
              <div class="layui-input-inline"  style="width: 80px;">
                <div name="picker1" id="picker1" style="line-height: 20px;">上传视频</div>
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <div class="div-inline" id="info1"><div class="progress" style="display: none;"><span class="text">0%</span><span class="percentage" style="width: 0%;"></span></div> 
              </div>
            </div>
          </div>            
          <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">播放地址：</label>
            <div class="layui-input-block">
              <textarea name="v_playurl[1]" id="v_playurl1" placeholder="" class="layui-textarea"><?= explode("$$",$v_playdata)[1] ?></textarea>
            </div>
          </div>

          <div class="layui-form-item">
            <div class="layui-block">
              <label class="layui-form-label">视频上传：</label>
              <div class="layui-input-inline" style="width: 80px;">
                <input name="selDown1" type="button" id="selDown1" class="layui-btn  layui-btn-sm layui-btn-normal" value="选择视频"/>
              </div>
              <div class="layui-input-inline"  style="width: 80px;">
                <div name="picker1" id="d_picker1" style="line-height: 20px;">上传视频</div>
              </div>
              <div class="layui-input-inline"  style="width: 100px;">
                <div class="div-inline" id="d_info1"><div class="progress" style="display: none;"><span class="text">0%</span><span class="percentage" style="width: 0%;"></span></div> 
              </div>
            </div>
          </div> 

          <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">下载地址：</label>
            <div class="layui-input-block">
              <textarea name="m_downurl[1]" id="m_downurl1" placeholder="" class="layui-textarea"><?= explode("$$",$v_downdata)[1] ?></textarea>
            </div>
          </div>            

          <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">视频介绍：</label>
            <div class="layui-input-block">
              <textarea name="v_content" id="v_content" placeholder="请输入内容" class="layui-textarea"><?php echo $v_content;?></textarea>
            </div>
          </div>     





        <div style="display: none;">
          <input type="hidden" name="v_id" value="<?php echo $id;?>" />
          <input type="hidden" name="v_back" value="<?php echo $Pirurl;?>" />
          <input type="text" name="v_enname" id="v_enname" value="<?php echo $vrow['v_enname'] ?>" size="23" onchange="this.value=this.value.replace(/[^\w]+/ig,'')" />
          ＊颜色：<select name="v_color">
              <option value="">标题颜色</option>
              <option style="background-color:#FF0000;color: #FF0000" value="#FF0000" selected>红色</option>
              <option style="background-color:#FF33CC;color: #FF33CC" value="#FF33CC">粉红</option>
              <option style="background-color:#00FF00;color: #00FF00" value="#00FF00">绿色</option>
              <option style="background-color:#0000CC;color: #0000CC" value="#0000CC">深蓝</option>
              <option style="background-color:#FFFF00;color: #FFFF00" value="#FFFF00">黄色</option>
              <option style="background-color:#660099;color: #660099" value="#660099">紫色</option>
              <option value="">无色</option>
            </select> 
            ＊<label>连载？<input type="checkbox" onclick="isViewState()" id="v_statebox" class="checkbox" /></label>
              <到第<input name="v_state" id="v_state" type="text"
                  size="5" />集
          <?php makeTypeOption2(0,"&nbsp;|&nbsp;&nbsp;",0);?>
          <input name="v_note" size="30" />关键词：<input type="text" id="v_tags" name="v_tags" size="30" />
          发行年份：<?php echo getYearSelect("v_publishyear","选择或填写",$row["v_publishyear"]);?>
          总点击： <input type="text" name="v_hit" id="v_hit" maxlength="9" value="0" size="6" />
          月点击： <input type="text" name="v_monthhit" id="v_monthhit" maxlength="9" value="0" size="6" />
          周点击：<input type="text" name="v_weekhit" id="v_weekhit" maxlength="9" value="0" size="6" />
          日点击：<input type="text" name="v_dayhit" id="v_dayhit" maxlength="9" value="0" size="6" />
          顶：<input type="text" name="v_digg" id="v_digg" maxlength="9" value="0" size="6" />
          踩： <input type="text" name="v_tread" id="v_tread" maxlength="9" value="0" size="6" />
          更新周期：
          <input name=v_reweek[] type=checkbox value=周一>周一
          <input name=v_reweek[] type=checkbox value=周二>周二
          <input name=v_reweek[] type=checkbox value=周三>周三
          <input name=v_reweek[] type=checkbox value=周四>周四
          <input name=v_reweek[] type=checkbox value=周五>周五
          <input name=v_reweek[] type=checkbox value=周六>周六
          <input name=v_reweek[] type=checkbox value=周日>周日
          时长：<input size="5" name="v_len" value="" />分钟
          集数：<input size="5" name="v_total" value="" />集


          视频别名：<input size="20" name="v_nickname" value="" />
          发行公司：<input size="20" name="v_company" value="" />
          电视台：<input size="20" name="v_tvs" value="" />
          视频评分：
          豆瓣<input size="3" name="v_douban" value="" />
          时光网<input size="3" name="v_mtime" value="" />
          IMDB<input size="3" name="v_imdb" value="" />
          站内<input size="3" name="v_score" value="" />
          评分次数<input size="3" name="v_scorenum" value="" />
          备用说明：<input size="100" name="v_longtxt" value="" />&nbsp;（不限字数文本内容，备用）
          试看：<input name="v_try" type="text" maxlength="5" value="0" size="4" />
          积分：<input name="v_money" type="text" maxlength="9" value="0" size="4" />
          分集：<input name="v_vip" type="text" size="8" />
          视频介绍：<textarea id="editor_id" name="v_content1" style="height:100px;"></textarea>
          <input name="v_playfrom[1]" type="text" value="Xgplayer"/>
          <input name="m_downfrom[1]" type="text" value="下载地址一"/>
        </div>
     
        <div class="layui-form-item">
          <div class="layui-input-block">
            <input type="submit" name="Submit" value="确定提交" lay-submit="" class="layui-btn"/>
            <input type="reset" name="reset" value="清除重置" class="layui-btn layui-btn-primary" />
          </div>
        </div>

      </form>
    </div>
  </div>
</div>

<script>
    window.editor = KindEditor.create('#editor_id', {
      uploadJson: 'editor/php/upload_json.php',
      fileManagerJson: 'editor/php/file_manager_json.php',
      allowFileManager: true,
      afterBlur: function () { this.sync(); }
    });

    bindButtonFile('#upButton11', '#v_pic');
    bindButtonUpImage('#upButton12','#upload_from1', '#v_pic');

    bindButtonFile('#upButton21', '#v_spic');
    bindButtonUpImage('#upButton22','#upload_from2', '#v_spic');

    bindButtonFile('#upButton31', '#v_gpic');
    bindButtonUpImage('#upButton32','#upload_from3', '#v_gpic');

    bindButtonFile('#selVideo1', '#v_playurl1', true, true);
    var up1 = new $WebUpload('#picker1', '#info1', '#v_playurl1');
    up1.init();

    bindButtonFile('#selDown1', '#m_downurl1', true, true);
    var up1 = new $WebUpload('#d_picker1', '#d_info1', '#m_downurl1');
    up1.init(); 

  </script>
</body>
</html>
